package com.songshuai.sales.client.service.impl;

import com.songshuai.sales.client.service.LabelService;
import com.songshuai.webapi.baseapi.model.sales.Label;
import com.songshuai.sales.client.dao.LabelMapper;

import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;


/**
 * 此类为[基础代码]自动生成,已经拥有基本的增删改成操作 
 * <其他请自行扩展>
 * @Author: 松鼠AI
 * @Date: 2019-03-11 16:40:41
 * 
 */
@Service
public class LabelServiceImpl implements LabelService{
 
      
    @Autowired
	private LabelMapper labelMapper;
	
	
	/**
     * 新增
     * @param entity 
     */
    public int insertSelective (Label entity) { 
        return this.labelMapper.insertSelective(entity);
    }	
    
    /**
     * 批量新增
     * @param list 
     */
    public void insertBatch(List<Label> list) {       
        this.labelMapper.insertBatch(list); 
    }
    
    /**
     * 根据主键修改单条数据
     * @param entity 
     */
    public int updateByPrimaryKey(Label entity) {
        return this.labelMapper.updateByPrimaryKey(entity);
    }
    
    /**
     * 根据主键批量修改数据
     * @param list 
     */
    public void updateBatch(List<Label> list) {      
        this.labelMapper.updateBatch(list);     
    }
    
    /**
     * 根据主键查询单条数据
     * @param labelId
     */
    public Label selectByPrimaryKey(String labelId) {
        return this.labelMapper.selectByPrimaryKey(labelId);
    }
    
    /**
     * 根据条件查询单条记录
     * @param entity 
     */
    public Label selectByEntity(Label entity) {
        return this.labelMapper.selectByEntity(entity);
    }
      
    /**
     * 根据条件查询多条记录
     * @param entity 
     */
    public List<Label> selectByEntityList(Label entity) {
        return this.labelMapper.selectByEntityList(entity);
    }
    
    /**
     * 根据条件查询Id
     * @param entity 
     */
    public String selectById(Label entity) {
        return this.labelMapper.selectById(entity);
    }
    
    /**
     * 根据条件查询Ids
     * @param entity 
     */
    public List<String> selectByIds(Label entity) {
        return this.labelMapper.selectByIds(entity);
    }
    
    /**
     * 根据主键删除单条记录
     * @param labelId
     */
    public void deleteByPrimaryKey(String labelId) {
        this.labelMapper.deleteByPrimaryKey(labelId);
    }
    
    /**
     * 根据主键删除多条记录
     * @param list
     */
    public void deleteBatch(List<String> list) {
        this.labelMapper.deleteBatch(list);
    }
    
    /**
     * 根据某些条件删除
     * @param entity
     */
    public void deleteByEntity(Label entity) {
        this.labelMapper.deleteByEntity(entity);
    }
    
   
}